<?php


namespace RedMVC\Event;
use RedMVC;

/**
 * Loader class
 *
 * @category    RedMVC
 * @package     Event
 * @author      Jan Fischer, bitWorking <info@bitworking.de>
 */
class Loader{

    public static function load(){
        $config = RedMVC\Registry::get('RedMVC_Config');

        if(!isset($config->events)){
            return;
        }

        foreach($config->events as $eventClass){
            if(class_exists($eventClass)){
                $instance = new $eventClass;
            }
        }
    }

}